import 'package:flutter/material.dart';
import 'package:flutter_shequ/api/home.dart';
import 'package:fluttertoast/fluttertoast.dart';

class Mypage extends StatefulWidget {
  const Mypage({Key? key}) : super(key: key);

  @override
  _MypageState createState() => _MypageState();
}

class _MypageState extends State<Mypage> {
  @override
  Widget build(BuildContext context) {
    return Container(
      child: Column(children: [
        Text('我的'),
        TextButton(
          onPressed: () async {
            final res = await getAnnounceListAPI();
            print(res);
          },
          child: Text('测试'),
        ),
        TextButton(
            onPressed: () {
              Fluttertoast.showToast(
                msg: '弹窗测试',
                toastLength: Toast.LENGTH_SHORT,
                gravity: ToastGravity.BOTTOM,
                backgroundColor: Colors.blue,
                textColor: Colors.white,
                webPosition: 'center',
                webBgColor: '#0000ff',
              );
            },
            child: const Text('弹窗'))
      ]),
    );
  }
}
